Aesthetics (encodings)

PH345: Winter 2025

Phil Boonstra

Farbtafel, Paul Klee (1930)

Which color appears most often?

https://www.demilked.com/tidying-up-art-ursus-wehrli/

Tidied up Farbtafel, Ursus Wehrli (2003)

Which color appears most often?

https://www.demilked.com/tidying-up-art-ursus-wehrli/

Mapping data to aesthetics

Aesthetics or encodings are ways that we map data to visual properties of the plot and include position, color, length, shape, area, volume

Choice of aesthetics helps or hinders your audience’s understanding of what the data are showing

Example: five proportions

One proportion for each of five groups (A-E)

For each of 9 plots, guess group B’s numerical proportion and rank. Enter your guesses on this google form:

https://tinyurl.com/ph345aesthetics

Plot 1

Plot 2

Plot 3

Plot 4

Plot 5

Plot 6

Plot 7

Plot 8

Plot 9

True values of B

Truth minus Guess (Bias)

Truth minus Guess (Ranks)

Relative order of accuracy

Take away: some aesthetics communicate data better than others

Figure 14 from Mackinlay (1986)

Bang Wong

Sr. Director at Vertex Pharmaceuticals.

Formerly Creative Director of the Broad Institute of MIT and adjunct assistant professor in the Department of Art as Applied to Medicine at Hopkins

Published monthly column on data visualization in Nature Methods journal from 2010-2012

Example 1

Different visual variables encoding the same five values.

Figure 1c from Wong (2010a)

Example 2

What is the rate of change of atmospheric CO2 over time?

Figure 6 from Cleveland and McGill (1985)

Example 3

What is the relative size of big vs small circle?

14x

How does distance between lines vary?

it’s constant

Figure 1c from Wong (2010a)

Types of data

  • Quantitative: numbers that measure units, e.g. years, kg, etc. Differences between numbers have meaning
  • Ordinal: numbers or categories that have natural order, e.g. Likert scales, tumor stage. Distances between numbers do not have consistent meaning (‘Almost always’ - ‘Sometimes’ = ?)
  • Nominal: Categories that have no inherent order, e.g. US states

Aesthetics for different types of data

Figure 15 from Mackinlay (1986)

Example 4

Lines in graphs create clear connection. Enclosure is an effective way to draw attention to a group of objects.

Figure 2b from Wong (2010b)

Example 5

What regions of the US experienced greatest population growth?

Figure 4.2, Wilke (2019)

Example 6

How do Malawi’s teachers positive teaching practices compare to those of other Sub-Saharan African countries?

Figure 3.2, Asim (2024)

Example 7

How do entrace and pass rates for Primary School Leaving Certificate Examinations (PSLCE) compare between boys and girls in Malawi?

Figure 5.2, Asim (2024)

Example 7

How do entrace and pass rates for Primary School Leaving Certificate Examinations (PSLCE) compare between boys and girls in Malawi?

Figure 5.2, Asim (2024)

Example 7

Ultimately, girls are 6 percent less likely than boys to enter the Primary School Leaving Certificate Examinations (PSLCE) and 13 percent less likely than boys to pass (refer to figure 5.2, panel b).

Example 8

Number of deployments is calculated as average for Bangladeshi, Indian, Nepali, Pakistani, and Sri Lankan labor migrants in their respective top five destination countries… remittances are defined as total amount of remittances that flow into Bangladesh, India, Nepal, and Pakistan.

Figure 3.4, Ahmed (2022)

Example 8

Questions:

  1. When was the amount of remittances into sending countries at its highest?
  2. For every 100 deploying migrants in 2006, how many deployed in 2015?
  3. How long did it take to recover to 2006 levels in terms of deploying migrants?

Phil’s Recreation of Figure 3.4

Plotting lines emphasizes change between points: the change in the annual growth rate. How easy is this to interpret?

Code Together Task

No Spice: Make an approximate version of my recreation of Figure 3.4 on slide 33: focus just on the structure

Weak Sauce: No menu options today…

Medium Spice: Make an approximate version of my ‘% Change from 2006’ plot on slide 35: focus just on the structure

Yoga Flame: Make an exact replicate of my recreation of Figure 3.4 on slide 33. I’m looking for perfection!

Dim Mak: Make an exact replicate of my ‘% Change from 2006’ plot on slide 35. I’m looking for perfection!

References

Ahmed, S.A. and Bossavie, L. eds., 2022. Toward Safer and More Productive Migration for South Asia. World Bank Publications. website

Asim, S. and Gera, R.C., 2024. What Matters for Learning in Malawi? Evidence from the Malawi Longitudinal School Survey. World Bank Publications-Books. website

Cleveland, W.S. and McGill, R., 1985. Graphical perception and graphical methods for analyzing scientific data. Science, 229(4716), pp.828-833.

Mackinlay, J., 1986. Automating the design of graphical presentations of relational information. Acm Transactions On Graphics (Tog), 5(2), pp.110-141.

Wehrli, U., 2003. Tidying Up Art. Prestel Publishing.

Wilke, C.O., 2019. Fundamentals of data visualization: a primer on making informative and compelling figures. O’Reilly Media.

Wong, B., 2010a. Design of data figures. Nature Methods, 7(9), pp.665-666.

Wong, B., 2010b. Points of view: Gestalt principles (Part 1). Nature Methods, 7(11), p.863.